<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:choose>
	<c:when test="${user != null}">
		<c:if test="${usertype == 'Admin User'}">
			<jsp:forward page="404.jsp" />
		</c:if>
	</c:when>
	<c:otherwise>
		<jsp:forward page="login.jsp" />
	</c:otherwise>
</c:choose>
<div id="content">


	<div id="page-heading">
		<h1>Transfer Money</h1>
	</div>

	<c:choose>
		<c:when test="${error == null}">
			<table id="content-table">
				<tr>
					<th rowspan="3" class="sized"><img
						src="resource/images/shared/side_shadowleft.jpg" width="20"
						height="300" alt="" /></th>
					<th class="topleft"></th>
					<td id="tbl-border-top">&nbsp;</td>
					<th class="topright"></th>
					<th rowspan="3" class="sized"><img
						src="resource/images/shared/side_shadowright.jpg" width="20"
						height="300" alt="" /></th>
				</tr>
				<tr>
					<td id="tbl-border-left"></td>
					<td>
						<!--  start content-table-inner -->
						<div id="content-table-inner">
							<form action="transferTransConfirm.html" method="post">
								<table>

									<tr>
										<!--  end step-holder -->

										<td style="width: 50%">

											<h1 style="margin-bottom: 10px;">Sender Info</h1>
											<table id="id-form">
												<tbody>
													<tr>
														<th valign="top" style="">Account Number:</th>
														<td>${senderAccountInfo.accountNumber}</td>
														<td><input name="senderAccountNumber" type="hidden"
															value="${senderAccountInfo.accountNumber}"></td>
													</tr>

													<tr>
														<th valign="top">ID Card Number:</th>
														<td>${senderAccountInfo.idCustomer.idCardNumber}</td>
														<td></td>
													</tr>

													<tr>
														<th valign="top">Customer Name:</th>
														<td>${senderAccountInfo.idCustomer.lastName}
															${senderAccountInfo.idCustomer.midName}
															${senderAccountInfo.idCustomer.firstName}</td>
														<td></td>
													</tr>

													<tr>
														<th valign="top">Current Balance:</th>
														<td>${senderAccountInfo.balance}</td>
														<td></td>
													</tr>
													<tr>
														<th valign="top">State:</th>
														<td>${senderAccountInfo.idState.nameState}</td>
														<td></td>
													</tr>
													<tr>
														<th valign="top">Money Transfer:</th>
														<td><input name="amountMoneyTransfer" type="number" min="1"
															max="${senderAccountInfo.balance}" class="inp-form" value="${amountMoneyTransfer }"
															></td>
														<td style="color: red">${validSendAmount}</td>
													</tr>

													<tr>
														<th>&nbsp;</th>
														<td><input type="submit" class="btnApprove"
															value="Submit" id="submit" /> <input
															onClick="location.href='searchAccount.html'"
															type="button" class="btnApprove" value="Close"
															id="transfer" />
														<td>
														<td></td>
													</tr>

												</tbody>
											</table>
									</td>

									<td style="width: 50%">
										<h1 style="margin-bottom: 10px;">Receiver Info</h1> <!-- start id-form -->
										<table id="id-form">
											<tr>
												<th valign="top" style="">Account Number:</th>
												<td><input name="receiverAccountNumber" type="text"
													class="inp-form" value="" required
													onKeyPress="return numbersonly(this, event)" /></td>
												<td style="color: red">${validReceiveAccount}</td>
											</tr>

										</table> <!-- end id-form  -->

									</td>
									</tr>
									<tr>
										<td><img src="resource/images/shared/blank.gif"
											width="695" height="1" alt="blank" /></td>
										<td></td>
									</tr>

								</table>
							</form>
							<div class="clear"></div>


						</div> <!--  end content-table-inner  -->
					</td>
					<td id="tbl-border-right"></td>
				</tr>
				<tr>
					<th class="sized bottomleft"></th>
					<td id="tbl-border-bottom">&nbsp;</td>
					<th class="sized bottomright"></th>
				</tr>
			</table>

		</c:when>
		<c:otherwise>
			<div id="message-area" align="center">
				<h1 style="color: red">${error}</h1>
			</div>
		</c:otherwise>
	</c:choose>
	<div class="clear">&nbsp;</div>

</div>